<?php
	$title='Fitness articles';
	$description='Fitness articles';
	$keywords='fitness, articles';
?>
<?php include('../fns_all.php'); ?>
<?php include('../views/layouts/_header.php'); ?>
<?php include('../views/layouts/_left.php'); ?>


<?php
	//rss feeds :
	//http://www.medicalnewstoday.com/rss/sports_medicine.xml
	//http://rss.msnbc.msn.com/id/3034510/device/rss/rss.xml     - with pics
	//http://news.google.com/news?ned=us&topic=h&output=rss

	//reader No1
	require_once("../magpierss/rss_fetch.inc");
	$num_items = 5;
	$url = "http://news.google.com/news?ned=us&topic=h&output=rss";
	$rss = fetch_rss( $url );

	$items = array_slice($rss->items, 0, $num_items);



	echo '<table><tr><td>';

	echo "<div style='width:300px;height:400px;overflow: scroll;
'>";
	echo "Channel Title: " . $rss->channel['title'] . "<p>";
	echo "<ul>";
	foreach ($items as $item) {
		$href = $item['link'];
		$title = $item['title'];
		$description = $item['description'];
		echo "<li><a href=$href>$title</a></li>";
		echo "<br/>$description";
	}
	echo "</ul>";
	echo "</div>";

	echo '</td><td>';

	echo "<br/><br/><div style='width:300px;height:400px;overflow: scroll;
'>";
	//reader No2
	require_once("../rsslib/rsslib.php");
	$url= "http://rss.msnbc.msn.com/id/3034510/device/rss/rss.xml";
	echo RSS_display($url, 10);
	echo "</div>";

	echo '</td></tr><tr><td>';

	echo "<br/><br/><div style='width:300px;height:400px;overflow: scroll;
'>";
	//reader No2
	require_once("../rsslib/rsslib.php");
	$url= "http://newsrss.bbc.co.uk/rss/sportplayer_uk_edition/other_sport/rss.xml";
	echo RSS_display($url, 20);
	echo "</div>";

	echo '</td><td>';

	echo "<br/><br/><div style='width:300px;height:400px;overflow: scroll;
'>";
	//reader No2
	require_once("../rsslib/rsslib.php");
	$url= "http://sports.yahoo.com/olympics/rss.xml";
	echo RSS_display($url, 20);
	echo "</div>";

	echo '</td></tr></table>';
?>


<?php include('../views/layouts/_footer.php'); ?>